package com.mika.cn.web.controller;

import com.mika.cn.pojo.dto.MikaDto;
import com.mika.cn.service.MikaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mika")
public class MikaConltroller {
    @Autowired
    private MikaService mikaService;
    @PutMapping("/add")
    public String  saveMika(MikaDto mikaDto){
        boolean b = mikaService.saveMika(mikaDto);
        if (b==false){
            return "添加失败";
        }

        return "添加成功";
    }
}
